package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.hr.example.UserRoleCompanyExample.E_CHILD_COMPANY_ID;
import static org.jsola.hr.example.UserRoleCompanyExample.E_EMPLOYER_ID;
import static org.jsola.hr.example.UserRoleCompanyExample.E_IS_ALL_CHILD_COMPANY;
import static org.jsola.hr.example.UserRoleCompanyExample.E_IS_ALL_EMPLOYER;
import static org.jsola.hr.example.UserRoleCompanyExample.E_ROLE_ID;
import static org.jsola.hr.example.UserRoleCompanyExample.E_USER_ID;
import static org.jsola.hr.example.UserRoleCompanyExample.M_CHILD_COMPANY_ID_MAX;
import static org.jsola.hr.example.UserRoleCompanyExample.M_EMPLOYER_ID_MAX;
import static org.jsola.hr.example.UserRoleCompanyExample.M_ROLE_ID_NOT_NULL;
import static org.jsola.hr.example.UserRoleCompanyExample.M_USER_ID_MAX;
import static org.jsola.hr.example.UserRoleCompanyExample.M_USER_ID_NOT_NULL;
import static org.jsola.hr.example.UserRoleCompanyExample.N_CHILD_COMPANY_ID;
import static org.jsola.hr.example.UserRoleCompanyExample.N_EMPLOYER_ID;
import static org.jsola.hr.example.UserRoleCompanyExample.N_IS_ALL_CHILD_COMPANY;
import static org.jsola.hr.example.UserRoleCompanyExample.N_IS_ALL_EMPLOYER;
import static org.jsola.hr.example.UserRoleCompanyExample.N_ROLE_ID;
import static org.jsola.hr.example.UserRoleCompanyExample.N_USER_ID;

/**
 * 人员分管用工单位
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【人员分管用工单位】的参数")
@Data
public class UserRoleCompanyAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_USER_ID, example = E_USER_ID, required = true)
    @NotNull(message = M_USER_ID_NOT_NULL)
    @Length(max = 32, message = M_USER_ID_MAX)
    private String userId;

    @ApiModelProperty(notes = N_ROLE_ID, example = E_ROLE_ID, required = true)
    @NotNull(message = M_ROLE_ID_NOT_NULL)
    private Long roleId;

    @ApiModelProperty(notes = N_CHILD_COMPANY_ID, example = E_CHILD_COMPANY_ID)
    @Length(max = 32, message = M_CHILD_COMPANY_ID_MAX)
    private String childCompanyId;

    @ApiModelProperty(notes = N_EMPLOYER_ID, example = E_EMPLOYER_ID)
    @Length(max = 32, message = M_EMPLOYER_ID_MAX)
    private String employerId;

    @ApiModelProperty(notes = N_IS_ALL_EMPLOYER, example = E_IS_ALL_EMPLOYER)
    private Boolean isAllEmployer;

    @ApiModelProperty(notes = N_IS_ALL_CHILD_COMPANY, example = E_IS_ALL_CHILD_COMPANY)
    private Boolean isAllChildCompany;


}

